<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>支付宝支付</title>
    <script>
      function getURLParam(name, url = window.location.href) {
        const result = url.match(
          new RegExp('(\\?|&)' + name + '(\\[\\])?=([^&#]*)')
        )
        return result ? result[3] : ''
      }

      function jumpPay() {
        const url = getURLParam('jump')
        location.href = decodeURIComponent(url)
      }
      jumpPay()

      document.addEventListener('visibilitychange', function () {
        if (document.hidden) {
          window.history.go(-1)
        }
      })
    </script>
  </head>
  <body>
    <div>跳转支付</div>
  </body>
</html>
